﻿Imports System
Imports System.Data.SqlTypes
Imports System.Workflow.Runtime

Namespace System.Workflow.Runtime.Hosting
    Public Class SqlPersistenceWorkflowInstanceDescription
        ' Methods
        Friend Sub New(ByVal workflowInstanceId As Guid, ByVal status As WorkflowStatus, ByVal isBlocked As Boolean, ByVal suspendOrTerminateDescription As String, ByVal nextTimerExpiration As SqlDateTime)
            Me.workflowInstanceId = workflowInstanceId
            Me.status = status
            Me.isBlocked = isBlocked
            Me.suspendOrTerminateDescription = suspendOrTerminateDescription
            Me.nextTimerExpiration = nextTimerExpiration
        End Sub


        ' Properties
        Public ReadOnly Property IsBlocked As Boolean
            Get
                Return Me.isBlocked
            End Get
        End Property

        Public ReadOnly Property NextTimerExpiration As SqlDateTime
            Get
                Return Me.nextTimerExpiration
            End Get
        End Property

        Public ReadOnly Property Status As WorkflowStatus
            Get
                Return Me.status
            End Get
        End Property

        Public ReadOnly Property SuspendOrTerminateDescription As String
            Get
                Return Me.suspendOrTerminateDescription
            End Get
        End Property

        Public ReadOnly Property WorkflowInstanceId As Guid
            Get
                Return Me.workflowInstanceId
            End Get
        End Property


        ' Fields
        Private isBlocked As Boolean
        Private nextTimerExpiration As SqlDateTime
        Private status As WorkflowStatus
        Private suspendOrTerminateDescription As String
        Private workflowInstanceId As Guid
    End Class
End Namespace

